Optimal. Leaf size=186 \[ \frac {(1-a-b x) \log (1-a-b x)}{2 b c}+\frac {(1+a+b x) \log (1+a+b x)}{2 b c}-\frac {d \log (1+a+b x) \log \left (-\frac {b (d+c x)}{c+a c-b d}\right )}{2 c^2}+\frac {d \log (1-a-b x) \log \left (\frac {b (d+c x)}{c-a c+b d}\right )}{2 c^2}+\frac {d \text {PolyLog}\left (2,\frac {c (1-a-b x)}{c-a c+b d}\right )}{2 c^2}-\frac {d \text {PolyLog}\left (2,\frac {c (1+a+b x)}{c+a c-b d}\right )}{2 c^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.17, antiderivative size = 186, normalized size of antiderivative = 1.00, number of steps
used = 15, number of rules used = 7, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.438, Rules used = {6250, 2456,
2436, 2332, 2441, 2440, 2438} \begin {gather*} \frac {d \text {Li}_2\left (\frac {c (-a-b x+1)}{-a c+c+b d}\right )}{2 c^2}-\frac {d \text {Li}_2\left (\frac {c (a+b x+1)}{a c+c-b d}\right )}{2 c^2}+\frac {d \log (-a-b x+1) \log \left (\frac {b (c x+d)}{-a c+b d+c}\right )}{2 c^2}-\frac {d \log (a+b x+1) \log \left (-\frac {b (c x+d)}{a c-b d+c}\right )}{2 c^2}+\frac {(-a-b x+1) \log (-a-b x+1)}{2 b c}+\frac {(a+b x+1) \log (a+b x+1)}{2 b c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2332
Rule 2436
Rule 2438
Rule 2440
Rule 2441
Rule 2456
Rule 6250
Rubi steps
\begin {align*} \int \frac {\tanh ^{-1}(a+b x)}{c+\frac {d}{x}} \, dx &=-\left (\frac {1}{2} \int \frac {\log (1-a-b x)}{c+\frac {d}{x}} \, dx\right )+\frac {1}{2} \int \frac {\log (1+a+b x)}{c+\frac {d}{x}} \, dx\\ &=-\left (\frac {1}{2} \int \left (\frac {\log (1-a-b x)}{c}-\frac {d \log (1-a-b x)}{c (d+c x)}\right ) \, dx\right )+\frac {1}{2} \int \left (\frac {\log (1+a+b x)}{c}-\frac {d \log (1+a+b x)}{c (d+c x)}\right ) \, dx\\ &=-\frac {\int \log (1-a-b x) \, dx}{2 c}+\frac {\int \log (1+a+b x) \, dx}{2 c}+\frac {d \int \frac {\log (1-a-b x)}{d+c x} \, dx}{2 c}-\frac {d \int \frac {\log (1+a+b x)}{d+c x} \, dx}{2 c}\\ &=-\frac {d \log (1+a+b x) \log \left (-\frac {b (d+c x)}{c+a c-b d}\right )}{2 c^2}+\frac {d \log (1-a-b x) \log \left (\frac {b (d+c x)}{c-a c+b d}\right )}{2 c^2}+\frac {\text {Subst}(\int \log (x) \, dx,x,1-a-b x)}{2 b c}+\frac {\text {Subst}(\int \log (x) \, dx,x,1+a+b x)}{2 b c}+\frac {(b d) \int \frac {\log \left (-\frac {b (d+c x)}{-(1-a) c-b d}\right )}{1-a-b x} \, dx}{2 c^2}+\frac {(b d) \int \frac {\log \left (\frac {b (d+c x)}{-(1+a) c+b d}\right )}{1+a+b x} \, dx}{2 c^2}\\ &=\frac {(1-a-b x) \log (1-a-b x)}{2 b c}+\frac {(1+a+b x) \log (1+a+b x)}{2 b c}-\frac {d \log (1+a+b x) \log \left (-\frac {b (d+c x)}{c+a c-b d}\right )}{2 c^2}+\frac {d \log (1-a-b x) \log \left (\frac {b (d+c x)}{c-a c+b d}\right )}{2 c^2}-\frac {d \text {Subst}\left (\int \frac {\log \left (1+\frac {c x}{-(1-a) c-b d}\right )}{x} \, dx,x,1-a-b x\right )}{2 c^2}+\frac {d \text {Subst}\left (\int \frac {\log \left (1+\frac {c x}{-(1+a) c+b d}\right )}{x} \, dx,x,1+a+b x\right )}{2 c^2}\\ &=\frac {(1-a-b x) \log (1-a-b x)}{2 b c}+\frac {(1+a+b x) \log (1+a+b x)}{2 b c}-\frac {d \log (1+a+b x) \log \left (-\frac {b (d+c x)}{c+a c-b d}\right )}{2 c^2}+\frac {d \log (1-a-b x) \log \left (\frac {b (d+c x)}{c-a c+b d}\right )}{2 c^2}+\frac {d \text {Li}_2\left (\frac {c (1-a-b x)}{c-a c+b d}\right )}{2 c^2}-\frac {d \text {Li}_2\left (\frac {c (1+a+b x)}{c+a c-b d}\right )}{2 c^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 3.16, size = 759, normalized size = 4.08 \begin {gather*} \frac {-2 a^2 c^2 \tanh ^{-1}(a+b x)+2 a b c d \tanh ^{-1}(a+b x)+i a b c d \pi \tanh ^{-1}(a+b x)-i b^2 d^2 \pi \tanh ^{-1}(a+b x)-2 a b c^2 x \tanh ^{-1}(a+b x)+2 b^2 c d x \tanh ^{-1}(a+b x)-2 a b c d \tanh ^{-1}\left (a-\frac {b d}{c}\right ) \tanh ^{-1}(a+b x)+2 b^2 d^2 \tanh ^{-1}\left (a-\frac {b d}{c}\right ) \tanh ^{-1}(a+b x)-b c d \tanh ^{-1}(a+b x)^2-a b c d \tanh ^{-1}(a+b x)^2+b^2 d^2 \tanh ^{-1}(a+b x)^2+b c d \sqrt {1-a^2+\frac {2 a b d}{c}-\frac {b^2 d^2}{c^2}} e^{\tanh ^{-1}\left (a-\frac {b d}{c}\right )} \tanh ^{-1}(a+b x)^2-2 a b c d \tanh ^{-1}\left (a-\frac {b d}{c}\right ) \log \left (1-e^{2 \left (\tanh ^{-1}\left (a-\frac {b d}{c}\right )-\tanh ^{-1}(a+b x)\right )}\right )+2 b^2 d^2 \tanh ^{-1}\left (a-\frac {b d}{c}\right ) \log \left (1-e^{2 \left (\tanh ^{-1}\left (a-\frac {b d}{c}\right )-\tanh ^{-1}(a+b x)\right )}\right )+2 a b c d \tanh ^{-1}(a+b x) \log \left (1-e^{2 \left (\tanh ^{-1}\left (a-\frac {b d}{c}\right )-\tanh ^{-1}(a+b x)\right )}\right )-2 b^2 d^2 \tanh ^{-1}(a+b x) \log \left (1-e^{2 \left (\tanh ^{-1}\left (a-\frac {b d}{c}\right )-\tanh ^{-1}(a+b x)\right )}\right )-2 a b c d \tanh ^{-1}(a+b x) \log \left (1+e^{-2 \tanh ^{-1}(a+b x)}\right )+2 b^2 d^2 \tanh ^{-1}(a+b x) \log \left (1+e^{-2 \tanh ^{-1}(a+b x)}\right )-i a b c d \pi \log \left (1+e^{2 \tanh ^{-1}(a+b x)}\right )+i b^2 d^2 \pi \log \left (1+e^{2 \tanh ^{-1}(a+b x)}\right )+2 a c^2 \log \left (\frac {1}{\sqrt {1-(a+b x)^2}}\right )-2 b c d \log \left (\frac {1}{\sqrt {1-(a+b x)^2}}\right )+i a b c d \pi \log \left (\frac {1}{\sqrt {1-(a+b x)^2}}\right )-i b^2 d^2 \pi \log \left (\frac {1}{\sqrt {1-(a+b x)^2}}\right )+2 a b c d \tanh ^{-1}\left (a-\frac {b d}{c}\right ) \log \left (-i \sinh \left (\tanh ^{-1}\left (a-\frac {b d}{c}\right )-\tanh ^{-1}(a+b x)\right )\right )-2 b^2 d^2 \tanh ^{-1}\left (a-\frac {b d}{c}\right ) \log \left (-i \sinh \left (\tanh ^{-1}\left (a-\frac {b d}{c}\right )-\tanh ^{-1}(a+b x)\right )\right )+b d (-a c+b d) \text {PolyLog}\left (2,e^{2 \left (\tanh ^{-1}\left (a-\frac {b d}{c}\right )-\tanh ^{-1}(a+b x)\right )}\right )+b d (a c-b d) \text {PolyLog}\left (2,-e^{-2 \tanh ^{-1}(a+b x)}\right )}{2 b c^2 (-a c+b d)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 8.19, size = 305, normalized size = 1.64
method | result | size |
risch | \(-\frac {\ln \left (-b x -a +1\right ) x}{2 c}-\frac {\ln \left (-b x -a +1\right ) a}{2 b c}+\frac {\ln \left (-b x -a +1\right )}{2 b c}-\frac {1}{b c}+\frac {d \dilog \left (\frac {c \left (-b x -a +1\right )+a c -d b -c}{a c -d b -c}\right )}{2 c^{2}}+\frac {d \ln \left (-b x -a +1\right ) \ln \left (\frac {c \left (-b x -a +1\right )+a c -d b -c}{a c -d b -c}\right )}{2 c^{2}}+\frac {\ln \left (b x +a +1\right ) x}{2 c}+\frac {\ln \left (b x +a +1\right ) a}{2 b c}+\frac {\ln \left (b x +a +1\right )}{2 b c}-\frac {d \dilog \left (\frac {c \left (b x +a +1\right )-a c +d b -c}{-a c +d b -c}\right )}{2 c^{2}}-\frac {d \ln \left (b x +a +1\right ) \ln \left (\frac {c \left (b x +a +1\right )-a c +d b -c}{-a c +d b -c}\right )}{2 c^{2}}\) | \(290\) |
derivativedivides | \(\frac {\frac {\arctanh \left (b x +a \right ) \left (b x +a \right )}{c}-\frac {\arctanh \left (b x +a \right ) d b \ln \left (a c -d b -c \left (b x +a \right )\right )}{c^{2}}+\frac {-\frac {b d \ln \left (a c -d b -c \left (b x +a \right )\right ) \ln \left (\frac {-c \left (b x +a \right )+c}{-a c +d b +c}\right )}{2 c}-\frac {b d \dilog \left (\frac {-c \left (b x +a \right )+c}{-a c +d b +c}\right )}{2 c}+\frac {b d \ln \left (a c -d b -c \left (b x +a \right )\right ) \ln \left (\frac {-c \left (b x +a \right )-c}{-a c +d b -c}\right )}{2 c}+\frac {b d \dilog \left (\frac {-c \left (b x +a \right )-c}{-a c +d b -c}\right )}{2 c}+\frac {\ln \left (a^{2} c^{2}-2 b a d c +d^{2} b^{2}-2 a c \left (a c -d b -c \left (b x +a \right )\right )+2 b d \left (a c -d b -c \left (b x +a \right )\right )-c^{2}+\left (a c -d b -c \left (b x +a \right )\right )^{2}\right )}{2}}{c}}{b}\) | \(305\) |
default | \(\frac {\frac {\arctanh \left (b x +a \right ) \left (b x +a \right )}{c}-\frac {\arctanh \left (b x +a \right ) d b \ln \left (a c -d b -c \left (b x +a \right )\right )}{c^{2}}+\frac {-\frac {b d \ln \left (a c -d b -c \left (b x +a \right )\right ) \ln \left (\frac {-c \left (b x +a \right )+c}{-a c +d b +c}\right )}{2 c}-\frac {b d \dilog \left (\frac {-c \left (b x +a \right )+c}{-a c +d b +c}\right )}{2 c}+\frac {b d \ln \left (a c -d b -c \left (b x +a \right )\right ) \ln \left (\frac {-c \left (b x +a \right )-c}{-a c +d b -c}\right )}{2 c}+\frac {b d \dilog \left (\frac {-c \left (b x +a \right )-c}{-a c +d b -c}\right )}{2 c}+\frac {\ln \left (a^{2} c^{2}-2 b a d c +d^{2} b^{2}-2 a c \left (a c -d b -c \left (b x +a \right )\right )+2 b d \left (a c -d b -c \left (b x +a \right )\right )-c^{2}+\left (a c -d b -c \left (b x +a \right )\right )^{2}\right )}{2}}{c}}{b}\) | \(305\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 192, normalized size = 1.03 \begin {gather*} \frac {1}{2} \, b {\left (\frac {{\left (\log \left (c x + d\right ) \log \left (\frac {b c x + b d}{a c - b d + c} + 1\right ) + {\rm Li}_2\left (-\frac {b c x + b d}{a c - b d + c}\right )\right )} d}{b c^{2}} - \frac {{\left (\log \left (c x + d\right ) \log \left (\frac {b c x + b d}{a c - b d - c} + 1\right ) + {\rm Li}_2\left (-\frac {b c x + b d}{a c - b d - c}\right )\right )} d}{b c^{2}} + \frac {{\left (a + 1\right )} \log \left (b x + a + 1\right )}{b^{2} c} - \frac {{\left (a - 1\right )} \log \left (b x + a - 1\right )}{b^{2} c}\right )} + {\left (\frac {x}{c} - \frac {d \log \left (c x + d\right )}{c^{2}}\right )} \operatorname {artanh}\left (b x + a\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x \operatorname {atanh}{\left (a + b x \right )}}{c x + d}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\mathrm {atanh}\left (a+b\,x\right )}{c+\frac {d}{x}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________